package com.demo.json;

import javax.json.bind.annotation.JsonbDateFormat;
import javax.json.bind.annotation.JsonbProperty;
import javax.json.bind.annotation.JsonbTransient;
import java.time.LocalDate;

@SuppressWarnings({"unused", "WeakerAccess"})
public class StudentDTO {

    private int id;

    //学号
    @JsonbProperty("学号")
    private String studentNo;

    //姓名
    @JsonbProperty("姓名")
    private String name;

    //部门
    @JsonbProperty("部门")
    private String department;

    //专业
    @JsonbProperty("专业")
    private String major;

    //班级
    @JsonbProperty("班级")
    private String clazz;

    //为使用jsonb，需要有一个空的默认构造方法
    public StudentDTO() {

    }

    public StudentDTO(String studentNo, String name, String department, String major, String clazz) {
        this.studentNo = studentNo;
        this.name = name;
        this.department = department;
        this.major = major;
        this.clazz = clazz;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getStudentNo() {
        return studentNo;
    }

    public void setStudentNo(String studentNo) {
        this.studentNo = studentNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    @Override
    public String toString() {
        return "StudentDTO{" +
                "id=" + id +
                ", studentNo='" + studentNo + '\'' +
                ", name='" + name + '\'' +
                ", department='" + department + '\'' +
                ", major='" + major + '\'' +
                ", clazz='" + clazz + '\'' +
                '}';
    }
}
